home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EuroCD 3
/
EuroCD 3.iso
/
Programming
/
Amos
/
Deform_Picture.Amos
/
Deform_Picture.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1998-06-24
|
2KB
|
53 lines
Rem "This is the first that I've saw program in AMOS that can deform full"
Rem "screen pictures like in demos written in assembler... Well, only the"
Rem "speed of this program isn't very fast, but was ever any powerfull"
Rem "program in amos fast? I don't think so... enjoy!"
Rem
Rem " this program wa written by raptor / sector5"
Rem " email: raptor2@free.polbox.pl"
Rem " www: http://www.free.polbox.pl/s/sector5"
'Put picture from bank 3 into the screens...
'Screen number 3 is main screen...
Unpack 3 To 4 : Screen Hide 4
Unpack 3 To 2 : Screen Hide 2
Unpack 3 To 1 : Cls 0 : Screen Hide 1
Unpack 3 To 0 : Cls 0 : Screen Hide 0
Unpack 3 To 3 : Cls 0 : Hide : Degree
XS=20
XZ=160 : YZ=128 : XZ1=160 : YZ1=128
Do
'Set more deform every turn...
If T=0 Then XS=XS+10
If T=1 Then XS=XS-10
If XS>0 Then T=1
If XS<150 Then T=0
'Add this two line if you want add ZOOM effect intro this program...
'If XZ>8 Then XZ=XZ-8 : YZ=YZ-4 : XZ1=XZ1+8 : YZ1=YZ1+4
'Zoom 4,XZ,YZ,XZ1,YZ1 To 2,0,0,320,256
'Calculate and copy intro screen 1 deform X from original screen 2
For X#=0 To 320 Step 2
For Y#=0 To 256 Step 256
Add ALFA,1,0 To 359
Screen Copy 2,X#,Y#,X#+2,Y#+256 To 1,X#,Y#+XS*Cos(ALFA)
Screen Copy 2,X#,Y#,X#+2,Y#+256 To 1,X#,Y#+XS*Cos(ALFA)-256
Screen Copy 2,X#,Y#,X#+2,Y#+256 To 1,X#,Y#+XS*Cos(ALFA)+256
Next
Next
'Calculate and copy intro screen 0 deform Y from deformed screen 1
For X#=0 To 320 Step 320
For Y#=0 To 256 Step 2
Add ALFA1,1,0 To 359
Screen Copy 1,X#,Y#,X#+320,Y#+2 To 0,X#+XS*Sin(ALFA1),Y#
Screen Copy 1,X#,Y#,X#+320,Y#+2 To 0,X#+XS*Sin(ALFA1)-320,Y#
Screen Copy 1,X#,Y#,X#+320,Y#+2 To 0,X#+XS*Sin(ALFA1)+320,Y#
Next
Next
'Copy deformed in X and Y picture from screen 0 into main screen 3
Screen Copy 0,0,0,320,256 To 3,0,0 : Screen 1 : Cls 0 : Screen 0 : Cls 0
Loop